<?php

trait A
{
    public function demo()
    {
        echo 'A中的demo...<br>';
    }
}

class User
{
    public function demo()
    {
        echo 'User中的demo...<br>';
    }
}

$u = new User();
$u->demo();
echo '<hr>';

class SVIP extends User
{
    use A;
}
$vip = new SVIP();
$vip->demo();